<script type="text/javascript" src="../js/tableMerge.js"></script>
<style>
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch"
          action="${request.getContextPath()}/TrackBackStatistics/trackBackStatistics" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="trackBackStatistics"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <label>订单日期：</label>
            <input type="text" name="startTime" data-pattern="yyyy-MM-dd" size="11" value="${startTime}"
                   data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" data-pattern="yyyy-MM-dd" size="11" value="${endTime}"
                   data-toggle="datepicker" placeholder="TO">&nbsp;
            <label>订单号：</label>
            <input type="text" name="docId" value="${docId}" size="15" placeholder="订单号"/>&nbsp;
        %{--<g:select name="docId" from="${trackBackStatisticsDocId}" data-toggle="selectpicker" data-live-search="true" optionKey="doc_id" optionValue="doc_id" value="${docId}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>PONO：</label>
            <input type="text" name="pono" value="${pono}" size="15" placeholder="PONO"/>&nbsp;
            <label>箱号：</label>
            <input type="text" name="caseNum" value="${caseNum}" size="12" placeholder="箱号"/>&nbsp;
        %{--<g:select name="caseNum" from="${trackBackStatisticsCaseNum}" data-toggle="selectpicker" data-live-search="true" optionKey="reserved6" optionValue="reserved6" value="${caseNum}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>整套IPN：</label>
            <input type="text" name="ipn" value="${ipn}" size="15" placeholder="整套IPN"/>
            %{--<g:select name="ipn" from="${trackBackStatisticsIpn}" data-toggle="selectpicker" data-live-search="true" optionKey="part_name" optionValue="part_name" value="${ipn}" noSelection="['':'ALL']" />&nbsp;--}%
            <br/><br/>
            <label>部件VPN：</label>
            <input type="text" name="vpn" value="${vpn}" size="14" placeholder="部件VPN"/>&nbsp;
        %{--<g:select name="vpn" from="${trackBackStatisticsVpn}" data-toggle="selectpicker" data-live-search="true" optionKey="reserved6" optionValue="reserved6" value="${vpn}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>部件IPN：</label>
            <input type="text" name="svpn" value="${svpn}" size="14" placeholder="部件IPN"/>&nbsp;
        %{--<g:select name="svpn" from="${trackBackStatisticsSvpn}" data-toggle="selectpicker" data-live-search="true" optionKey="reserved7" optionValue="reserved7" value="${svpn}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>刻印号：</label>
            <input type="text" name="kyh" value="${kyh}" size="14" placeholder="刻印号"/>&nbsp;
        %{-- <g:select name="kyh" from="${trackBackStatisticsKyh}" data-toggle="selectpicker" data-live-search="true" optionKey="substrate_id1" optionValue="substrate_id1" value="${kyh}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>客户LOT：</label>
            <input type="text" name="customerLot" value="${customerLot}" size="14" placeholder="客户LOT"/>&nbsp;
            <label>订单状态：</label>
            %{--<g:select name="state" from="${trackBackStatisticsState}" data-toggle="selectpicker" data-live-search="true" optionKey="doc_status" optionValue="doc_status" value="${state}" noSelection="['':'ALL']" />&nbsp;--}%
            <g:select name="state" from="${trackBackStatisticsState}" class="selectpicker" data-live-search="true"
                      data-live-search-placeholder="查找" data-width="150" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="doc_status" optionValue="doc_status" value="${state}"
                      multiple="multiple" data-width="200"/>
            <br/><br/>
            <label>客户名称：</label>
            <g:select name="khmc" from="${trackBackStatisticsKhmc}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="reserved1" optionValue="reserved1" value="${khmc}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>工段：</label>
            <g:select name="gzzx" from="${trackBackStatisticsGZZX}" class="selectpicker" data-live-search="true"
                      data-live-search-placeholder="查找" data-width="150" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="gzzx" optionValue="gzzx" value="${gzzx}"
                      multiple="multiple" data-width="200"/>&nbsp;
            <label>事务类型：</label>
            <g:select name="transType" from="${trackBackStatisticsSWLX}" class="selectpicker" data-live-search="true"
                      data-live-search-placeholder="查找" data-width="150" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="TRANS_TYPE" optionValue="TRANS_TYPE_DESC" value="${transType}"
                      multiple="multiple" data-width="200"/>&nbsp;
            <label>事务时间段<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="startT" data-pattern="yyyy-MM-dd" size="12" value="${startT}" data-rule="required"
                   data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endT" data-pattern="yyyy-MM-dd" size="12" value="${endT}" data-rule="required"
                   data-toggle="datepicker" placeholder="TO">&nbsp;
            <br /><br />
            <label>清洗属性：</label>
            <g:select name="qxsx" from="${trackBackStatisticsQxsx}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="reserved2" optionValue="reserved2" value="${qxsx}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>批次：</label>
            <input type="text" name="lotId" value="${lotId}" size="14" placeholder="批次"/>&nbsp;
            <label>设备：</label>
            <input type="text" name="eqpId" value="${eqpId}" size="14" placeholder="设备"/>&nbsp;
            <label>部门：</label>
            <input type="text" name="deptName" value="${deptName}" size="14" placeholder="部门"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/TrackBackStatistics/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
            %{--<a type="button" class="btn btn-blue" href="${request.getContextPath()}/TrackBackStatistics/expExcel"--}%
               %{--data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="file-excel-o" title="导出Excel">导出</a>--}%
            %{--<button type="button" class="btn-blue"--}%
                    %{--onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/TrackBackStatistics/expExcel')"--}%
                    %{--data-icon="file-excel-o" title="导出Excel">导出</button>--}%
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${trackBackStatistics.size() > 0}">
        <table id="data" data-toggle="tablefixed" data-width="400%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <th width="50">NO.</th>
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance != 'RN' && headInstance != 'CREATE_TIME'}">
                        <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
                <g:each in="${trackBackStatistics}" status="i" var="dataInstance">
                    <tr>
                        <td>${dataInstance.RN}</td>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance != 'RN' && headInstance != 'CREATE_TIME'}">
                                <td>${dataInstance["${headInstance}"]}</td>
                            </g:if>
                        </g:each>
                    </tr>
                </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/51pagination"/>